# Maintainer: Linus Swälas <linus.swalas@borderless.se>
pkgname=xf86-video-amdgpu
pkgver=21.0.0
pkgrel=0
pkgdesc="AMD Rx/HDxxxx video driver"
url="https://xorg.freedesktop.org"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
options="!check"
depends="mesa-dri-ati"
makedepends="xorg-server-dev libxi-dev libdrm-dev mesa-dev eudev-dev pixman-dev
	util-macros xorgproto libpciaccess-dev"
source="https://www.x.org/releases/individual/driver/xf86-video-amdgpu-$pkgver.tar.bz2
	"

build() {
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
44ccc8ddc36f09d1608cf58b6cf85dda090671c46c5643e9453f7d67f4d6850c3c9753eba43539d45773198b8042898a50153b5225780e4b2852410c5521314a  xf86-video-amdgpu-21.0.0.tar.bz2
"
